
                  Kalkulator How-To (December 14, 1996)
                  =====================================

------------------------------------------------------------------------

NEW TOPICS in the 96/12/14 release: Q-17, Q-18

NEW TOPICS in the 96/11/05 release: Q-15, Q-16

NEW TOPICS in the 96/08/29 release: Q-13, Q-14

------------------------------------------------------------------------

NOTE: in these examples we assume you are currently in the Kalkulator
Main Panel and that the Expression line has been cleared (hit Escape to
clear it if necessary).

------------------------------------------------------------------------

Q-01: How to compute 2/3-3/7 ??

A: Using the keyboard or mouse, enter

      2/3-3/7

   and hit the Return key.

------------------------------------------------------------------------

Q-02: How to show the result of the previous calculation as a fraction?

A: Press Alt-M [Format] and then R [Fraction].

------------------------------------------------------------------------

Q-03: How to convert 120 watts into horsepower units?

A: Enter 120 and hit Return. Press Alt-N [Convert]. Select "Power" from
   the top selector, then "watts" from the middle one, then
   "horsepower(MKS)" from the bottom one. Click on [OK]. The result
   should be 0.16...

------------------------------------------------------------------------

Q-04: A box-shaped container is 2 feet 2.5 inches tall, 1 foot 2 1/3
   inches wide and 10 3/8 inches deep. What is its volume in gallons?

A. Thank you for asking. First let us compute the volume in cubic feet;
   type

       ft(2,2.5)*ft(1,2+1/3)*ft(0,10+3/8)

   and hit the Enter key. The displayed result should be 2.28...
   Next, click on [Convert]. Then click on the "Convert" combo box and
   select "Volume". Click on the "From" combo and select "cu.feet",
   then on "To" and select "gallons(US)". Click on [OK]. The converted
   result will be 17.059...

------------------------------------------------------------------------

NOTE: if your needs are limited to simple tasks as shown above, you
may like to shrink the Kalkulator: select [Options | Panel Options]
from the menu, then select "Minimal" from the top selector and uncheck
the "Menu and Title Bar" box. This way you get a small, simple and
friendly calculator, with the more advanced features not getting into
your way. You may also choose "Basic" instead of "Minimal".

As an alternative, you may consider using Kalkulator's offspring, the
Midget. It will handle these problems just fine, is smaller and less
expensive.

------------------------------------------------------------------------

Q-05: How to solve an equation x+exp(x)=2 ?

A: First express the equation as f(t)=0; to do this, enter f(t) as

     t+exp t-2

   Next, click on [Zero]. When asked for the solution limits and
   accuracy, enter something reasonable, like 0, 100 and 1E-8
   (or .00000001). Click on [OK]. The result should be 0.44...

------------------------------------------------------------------------

Q-06: How to compute an integral of f(x)=1/(x+4) from 0 to 2?

A: Enter f(t) as

     1/(t+4)

   into the Expression Line. Click on [Integ]. When the dialog box
   prompts you for integral limits and accuracy, enter 0, 2 and 1E-6
   (or another accuracy value), respectively. Click on [OK]. The
   result, 0.405..., will be stored in the Temporary Variable, t.

------------------------------------------------------------------------

Q-07: How to graph a function, e.g. f(x)=exp(-abs(x))*sin(1/x) for x
   between -2 and 2 ??

A: Enter the expression using t as the function argument

     exp(-abs t)*sin(1/t)

   and click on [Graph]. Enter -2 and 2 as x-limits. Click on [Find]
   and [Round], then on [OK].

   Note: this is a very unpleasant function to graph. You may want
   to increase the graph precision by selecting the [Options|Graph
   Options] menu and checking the "Fine Detail" box (do it before
   clicking on [Graph], of course). Then find any other function
   graphing program and see what job it will do. Bingo.

------------------------------------------------------------------------

Q-08: How to fit a square regression curve through a series of XY points?

A: Click on [Edit]. If necessary, click on [Mode] to set the buffer
   to the XY mode. Make sure the buffer is clear (use [Clear] if
   necessary). Type your points into the yellow box: X on the
   left, Y on the right; use arrow, Tab and Return keys as needed.
   Click on Exit. In the Main Panel click on [Regr] and select
   "2nd degree". When asked about the plot, click on [Yes].
   In the Graph Range dialog, click on [Find] and [Round]. Done.

------------------------------------------------------------------------

Q-09: How to compare visually a square regression curve from the example
   above with a linear regression line?

A: If the graph generated above is still visible, press Escape.
   Click on [Regr] and select "1st degree", but answer [No] to the
   question on drawing the line. Clear the Expression Line (press
   Escape), and enter

     poly t

   Click on [Show], then on [Add]. Enjoy.

------------------------------------------------------------------------

Q-10: How to solve a system of three linear equations:

      2*x1 -  x2             = 3
      -x1  + 1.5*x2 - 0.3*x3 = -7
             x2     - x3     = 1

A: Click on [Extras | Linear algebra] to bring up the Linear Algebra
   Panel. Click on [Size] and select "3". Click on [Edit] and select
   "a". Enter the matrix so that the input grid contains:

      2    -1     0
     -1   1.5  -0.3
      0     1    -1

   and click on [OK]. Then click on [Edit] again and select "u".
   Enter the vector:

      3
     -7
      1

   and click on [OK] again.

   From the keyboard enter "a/u=v".

   To view the solution, click on [Edit] and select "v". The result
   will be (-2.64..., -8.28..., -9.28...).

------------------------------------------------------------------------

Q-11: How do I know that this is the right solution?

A: There are three ways:

   (1) Trust me.

   (2) In the Linear Algebra Panel, enter "a*v=w", then use [Edit]
       and "w". The vector w should be the same as u.

   (3) The hard way: exit the Linear Algebra Panel and
       compute the following three expressions in the Main Panel:

          2v#1-v#2

          -v#1+1.5v#2-.3v#3

          v#2-v#3

       The results should be 3, -7 and 1, respectively.

    The recommended method is (1).

------------------------------------------------------------------------

Q-12: How to solve a cubic equation:

   2*x^3-9*x^2+x+5=0

   storing the largest real root as variable U?

A: First, get into the Root Panel by clicking on [Extras | Polynomial
   Roots]. Enter the polynomial coefficients into the yellow data grid
   at the left so that the grid looks like

         5
         1
        -9
         2

   Click on [Solve]. The solution display at the right will show three
   real roots: t1=-0.649..., t2=4.243... and t3=0.906...
   Click the left mouse button on the largest one (t2) and select U
   from the pop-up menu.

------------------------------------------------------------------------

Q-13: How to compute an integral of f(x)=x^3*exp(-x) over an interval
   from 0 to 8?

A: First enter the function as an expression line, remembering to use
   t as the argument:

      t^3*exp(-t)

   Then click on [Integ] and type in the limits: 0 and 8, as well as the
   desired accuracy, say, 1E-9. Click on [OK]. The result will be about
   5.745719...

------------------------------------------------------------------------

Q-14: The above approach would not work if the "x^3" above is changed
   to "x^3.2": I'm getting an error message, why?

A: Integration of "t^3.2*exp(-t)" over [0,8] involves computing of 0^3.2,
   and this is an illegal arithmetic operation (fractional powers of zero
   are not defined).

   On the other hand, we know that the function converges to 0 at 0;
   therefore we may redefine it with use of a conditional function as

      ifz(t,0,t^3.2*exp(-t))

   Type this expression in and repeat the rest of the previous procedure.
   The result will be 7.35919...

------------------------------------------------------------------------

Q-15: How do I convert the decimal value of -1200 to binary?

A: Go to the Computer Math Panel by clicking on [Extras | Computer math]
   and click on the mode button (on the right, just under the display)
   to select Signed Decimal. Now you have to choose the word length:
   click on the bit length button (just below the previous one) and
   select 16 bits (32 would be OK too, but the number will not fit into
   an 8-bit word). Type in "1200" and click on the [] button. The
   display should read "-1200" now. Click on the mode button again and
   select Binary. Done: the display should say now "11111011 01010000".

------------------------------------------------------------------------

Q-16: I'm using the Computer Math calculator to multiply 999 by 66. The
   result is 398. What is wrong and how do I fix it?

A: Nothing is wrong. You are obviously working in the Decimal mode
   (signed or not) and with 16-bit words. The multiplication result,
   65934, does not fit into a 16-bit word, so the program does what a
   computer doing 16-bit math would do: it drops the most significant
   part of the result. If you want this not to happen, switch to 32-bit
   words or, even better, use the Main Panel for "regular" (as opposed
   to "computer") arithmetics.

------------------------------------------------------------------------

Q-17: I would like to define tan(x/4)*(2*sin(x/2)-cos(2x)) as a function
   of x so that it can be easily used in my calculations. How?

A: First, enter the function into the Expression Line, using t (not x!)
   as the argument:

      tan(t/4)*(2*sin(t/2)-cos(2*t))

   or, using fewer parentheses and multiplication signs

      tan .25t*(2 sin .5t-cos 2t)

   Click on the [User] tab in the Function Panel at the left and then
   on [Define]. Select a slot from the pop-up menu, for example, 1.
   Type the function name, for example, "trix" into the small box
   asking you for it. Hit Enter.

   Note that one of the buttons in the User Function Page will now be
   marked as [trix]. Now you can use trix as a regular function in
   your expression; as in

      trix(30.27)-2*trix(15/2A)+sin(27.333)

   (obviously, I'm doing this in the Degree mode, but this is not
   necessary).

------------------------------------------------------------------------

Q-18: Now I would like to define f(x,y) = xy+2*ln(x/y). How do I do it?

A: You don't. At present, Kalkulator allows for user-defined functions
   of just one argument (denoted as t).

   But if you really do not need a function, but rather just to evaluate
   the expression a number of times for various x and y, then you can
   do it:

   Enter the expression:

     XY+2 ln(X/Y)

   Then click on the [Browser] tab in the Variable Panel and set
   variables X and Y to the values you need, by clicking on [Put],
   selecting X or Y from the pop-up menu, entering a value and hitting
   Enter. When X and Y are set, just hit Enter again. The expression
   value will be computed. Then use [Put} again to enter other
   combinations of X and Y.

   By the way, I'm thinking about introducing two-argument user functions
   in one of the future releases.

------------------------------------------------------------------------

Q-99: How do I get the newest version of Kalkulator?

A: Set your browser to my Web page:

     http://www.freeflight.com/wrotniak/software.html

   This Web page contains both 16- and 32-bit versions of Kalkulator.
   They are virtually identical, except that the 32-bit one is somewhat
   faster under Windows 95.

------------------------------------------------------------------------

